import React, { useState } from "react";

interface Props {
  visible: boolean;
  children?: React.ReactNode;
}

const Overly: React.FC<Props> = (props) => {
  return props.visible ? (
    <div
      style={{
        width: "100%",
        height: "100%",
        position: "fixed",
        top: 0,
        left: 0,
        zIndex: 999,
        backgroundColor: "rgba(0, 0, 0, 0.5)",
      }}
    >
      {props.children}
    </div>
  ) : null;
};
export default Overly;
